Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 3622 - no autofocus and clean FocusNode management #3716

Merged
merged 3 commits into from
Feb 21, 2023

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • edit_new_packagings_component.dart: applied best practices for FocusNode (had to switch to StatefulWidget for that)
  • Podfile.lock: wtf
  • simple_input_number_field.dart: removed autofocus: true
  • simple_input_text_field.dart: removed autofocus: true
  • simple_input_widget.dart: applied best practices for FocusNode

What

  • The systematic autofocus: true parameter for each text field made no sense and probably provoked the referenced issue.
  • Instead, putting autofocus: false fixed the issue.
  • In the process I applied best practices about FocusNode.

Fixes bug(s)

# Conflicts:
#	packages/smooth_app/pubspec.lock
#	packages/smooth_app/pubspec.yaml
Impacted files:
* `edit_new_packagings_component.dart`: applied best practices for `FocusNode` (had to switch to `StatefulWidget` for that)
* `Podfile.lock`: wtf
* `simple_input_number_field.dart`: removed `autofocus: true`
* `simple_input_text_field.dart`: removed `autofocus: true`
* `simple_input_widget.dart`: applied best practices for `FocusNode`
@codecov-commenter
Copy link

Codecov Report

Merging #3716 (fdbc291) into develop (70bdceb) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop    #3716      +/-   ##
===========================================
- Coverage    10.41%   10.40%   -0.02%     
===========================================
  Files          273      273              
  Lines        13795    13815      +20     
===========================================
  Hits          1437     1437              
- Misses       12358    12378      +20     
Impacted Files Coverage Δ
...b/pages/product/edit_new_packagings_component.dart 0.00% <0.00%> (ø)
...p/lib/pages/product/simple_input_number_field.dart 0.00% <ø> (ø)
...app/lib/pages/product/simple_input_text_field.dart 0.00% <ø> (ø)
...oth_app/lib/pages/product/simple_input_widget.dart 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't say if it will work but looks okay code wise, thanks @monsieurtanuki

@monsieurtanuki monsieurtanuki merged commit 87ac56d into openfoodfacts:develop Feb 21, 2023
@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev for the review!
Can't be worse, we used to say "each field has the top priority!"...

@stephanegigandet
Copy link
Contributor

@monsieurtanuki I just got back from a few days off, thank you so much for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍎 iOS iOS specific issues or PRs 🥫 Product page
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packaging components edition - Cursor is at top of 1st component when adding a 2nd component
4 participants